#ifndef __G_INPUT_MAP_H__
#define __G_INPUT_MAP_H__

#include <vector>

#include "GInput.h"
#include "GTypes.h"
#include "GHandlePool.h"

namespace GEngine
{

	//! Also add events support with callbacks!
	class GInputMap
	{
	friend class GGameManager;

	typedef std::vector<GInput> InputArr;
	typedef GUtil::GHandlePool<GInput, 32> InputPool;

	private:
		bool			Active;
		InputPool		Inputs;

	public:
						GInputMap();
		virtual			~GInputMap();

		void			SetActive(bool Value);
		bool			GetActive() const;

		void			ClearInputs();

		GUtil::GHandle	AppendInput(const GInput& Input);
		void			RemoveInput(const GUtil::GHandle& Handle);

		const GInput*	GetInput(const GUtil::GHandle& Handle) const;

		bool			CheckInput(GUtil::GHandle Handle0) const;
		bool			CheckInput(GUtil::GHandle Handle0, GUtil::GHandle Handle1) const;
		bool			CheckInput(GUtil::GHandle Handle0, GUtil::GHandle Handle1, GUtil::GHandle Handle2) const;

	};

}

#endif